package 数据结构.单向链表数据结构.Test01;

public class Link {
    Node header = null;
    int size = 0;
    public int size(){
        return size;
    }
    public void add(Object data){
      if(header == null){
          header = new Node(data,null);
      }else {
          Node currentLastNode = findList(header);
          currentLastNode.next = new Node(data,null);
      }
      size++;
    }

    private Node findList(Node node) {
        if(node.next == null){
            return node;
        }
        return findList(node.next);
    }

    public void remove(Object obj){

    }
    public void modify(Object obj){

    }
    public int find(Object obj){
        return 1;
    }
}
